It is known from DE 10 2014 103 139 A1 that the porting of control software that has been developed to run on a single-core vehicle control device to a multi-core control device can be executed in an automated process. Furthermore, the use of so-called time implicit communication (TIC) is known from DE 10 2014 103 139 A1. In the following the concepts of parallelization of runnables as well as time implicit communication will be summarized as they contribute to understanding the present disclosure.
An aspect that facilitates the parallelization of runnables and thus porting of SC-software into MC-software is the detection of strong and weak precedence constraints among runnables in the existing control software, which exchange information through persistent memory variables.
In the existing control software runnables may access a persistent memory variable as writers and readers for performing information exchange. These runnables are repeatedly executed (as instances) and perform in each execution substantially the same write- or read-access to the persistent memory variable. Execution of the runnables is executed as a rule at pre-defined periodicities, e.g. every 1, 3, 5 or 10 milliseconds. The periodicities frequently vary for a writer-runnable and a reader-runnable.
In the existing control software it may occur that an instance of a writer-runnable and an instance of a reader-runnable are planned to be executed according to their periodicities simultaneously. In the existing SC-software those runnables must be performed sequentially and precedence-constraints decide on the fact which one of the runnables will be executed before the other. The precedence-constraints can be determined automatically, e.g. based on an execution order or from priorities of tasks or single runnables.
DE 10 2014 103 139 A1 illustrates several rules, according to which a precedence-constraint may be classified as weak or strong. In the porting, weak precedence-constraints can be broken up and replaced by co-ordination of the runnables (setting equal ranks to the runnables) within the MC-software. The co-ordination may lead to time-parallel execution of the instances of the writer-runnable and the reader-runnable. Information exchange among parallelized runnables is then performed through time-implicit communication. For MC-execution, the persistent memory variable is stored in a separately administrated database, which facilitates writing and reading access free of waiting time.
The precedence-constraints in the existing control software ascertain that a write-procedure of a precedent writer-runnable is performed temporally before the read-procedure of a subordinate reader-runnable. This ensures, that for an information transfer among temporally concurring runnables the write-access to the persistent memory variable will be performed temporally separated and prior to a read-access. When those runnables are parallelized, the sequential access to the persistent memory variable cannot be ensured any more. With time implicit communication the temporal relation of access to the persistent memory variable is redesigned. The exchange of current communication data (i.e. in the SC-software write current data first, then read the current data, or respectively first produce then consume current data) is replaced in the MC-execution by usage or a (slightly) older buffered data value for the reader-runnable. A waiting time free access to a separately stored persistent memory variable may be facilitated in that a main memory value and a buffer memory value are set up for each memory variable, wherein the buffer memory value is accessible for reading while a write-access is performed on the main memory value. A reader-runnable, which is executed on a first computational core, may perform a read-access to the latest (older) value in the buffer memory value, while simultaneously a parallelized executed writer-runnable writes a new data value into the main memory value. Thus an instance of the reader-runnable and an instance of the writer-runnable can be fully parallelized and even perform a write-procedure and a read-procedure for the communication variable simultaneously.